import request from '@/utils/request'

// 创建评论
export function createComment(data) {
  return request({
    url: '/comment/create',
    method: 'post',
    data
  })
}

// 删除评论
export function deleteComment(commentId) {
  return request({
    url: `/comment/${commentId}`,
    method: 'delete'
  })
}

// 获取评论列表
export function getCommentList(data) {
  return request({
    url: '/comment/list',
    method: 'post',
    data
  })
}

// 点赞/取消点赞评论
export function toggleLikeComment(commentId) {
  return request({
    url: `/comment/${commentId}/like`,
    method: 'post'
  })
}
